home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
wsc4c21.zip
/
MENU.C
< prev
next >
Wrap
C/C++ Source or Header
|
1997-05-22
|
1KB
|
52 lines
/*** menu.c ***/
#include "windows.h"
#include "wsc.h"
#include "menu.h"
extern HWND hMainWnd;
extern int FatalFlag;
extern int OnLineFlag;
extern char Temp[256];
/*** PUBLIC ***/
void CheckTheMenu(int MenuID)
{HMENU hMenu;
if(MenuID)
hMenu = GetMenu(hMainWnd);
CheckMenuItem(hMenu,MenuID,MF_BYCOMMAND | MF_CHECKED);
}
void UncheckTheMenu(int MenuID)
{HMENU hMenu;
hMenu = GetMenu(hMainWnd);
CheckMenuItem(hMenu,MenuID,MF_BYCOMMAND | MF_UNCHECKED);
}
void EnableTheMenu(int MenuID)
{HMENU hMenu;
hMenu = GetMenu(hMainWnd);
EnableMenuItem(hMenu,MenuID,MF_BYCOMMAND | MF_ENABLED);
}
void DisableTheMenu(int MenuID)
{HMENU hMenu;
hMenu = GetMenu(hMainWnd);
EnableMenuItem(hMenu,MenuID,MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
}
void EnableMenuBarItem(int nPos)
{HMENU hMenu;
hMenu = GetMenu(hMainWnd);
EnableMenuItem(hMenu,nPos,MF_BYPOSITION | MF_ENABLED);
}
void DisableMenuBarItem(int nPos)
{HMENU hMenu;
hMenu = GetMenu(hMainWnd);
EnableMenuItem(hMenu,nPos,MF_BYPOSITION | MF_DISABLED | MF_GRAYED);
}